//
//  TestData.m
//  Mahjong
//
//  Created by 饶首建 on 17/5/26.
//  Copyright © 2017年 com.ikamobile.com. All rights reserved.
//

#import "TestData.h"

@implementation TestData

- (NSDictionary *)dictionaryWithJsonString:(NSString *)jsonString {
    if (jsonString == nil) {
        return nil;
    }
    NSData *jsonData = [jsonString dataUsingEncoding:NSUTF8StringEncoding];
    NSError *err;
    NSDictionary *dic = [NSJSONSerialization JSONObjectWithData:jsonData
                                                        options:NSJSONReadingMutableContainers
                                                          error:&err];
    if(err) {
        Log(@"json解析失败：%@",err);
        return nil;
    }
    return dic;
}

- (void)testData{
    NSArray *tmp = @[
                     @{@"setNo":@4,
                       @"players":@[
                               @{
                                   @"playerName":@"张三",
                                   @"isSelf":@YES,
                                   @"bonus":@12,
                                   @"tags":@[@"七对",@"清一色",@"清一色",@"清一色",@"清一色",@"清一色",@"清一色",@"清一色"]
                                   },
                               @{
                                   @"playerName":@"赵四",
                                   @"isSelf":@NO,
                                   @"bonus":@-10,
                                   @"tags":@[@"平胡"]
                                   },
                               @{
                                   @"playerName":@"刘能",
                                   @"isSelf":@NO,
                                   @"bonus":@3,
                                   @"tags":@[@"平胡"]
                                   },
                               @{
                                   @"playerName":@"范增",
                                   @"isSelf":@NO,
                                   @"bonus":@-5,
                                   @"tags":@[]
                                   },
                               
                               ]
                       },
                     @{@"setNo":@3,
                       @"players":@[
                               @{
                                   @"playerName":@"张三",
                                   @"isSelf":@YES,
                                   @"bonus":@12,
                                   @"tags":@[@"七对",@"清一色"]
                                   },
                               @{
                                   @"playerName":@"赵四",
                                   @"isSelf":@NO,
                                   @"bonus":@-10,
                                   @"tags":@[@"平胡"]
                                   },
                               @{
                                   @"playerName":@"刘能",
                                   @"isSelf":@NO,
                                   @"bonus":@3,
                                   @"tags":@[@"平胡"]
                                   },
                               @{
                                   @"playerName":@"范增",
                                   @"isSelf":@NO,
                                   @"bonus":@-5,
                                   @"tags":@[]
                                   },
                               
                               ]
                       },
                     @{@"setNo":@2,
                       @"players":@[
                               @{
                                   @"playerName":@"张三",
                                   @"isSelf":@YES,
                                   @"bonus":@12,
                                   @"tags":@[@"七对",@"清一色"]
                                   },
                               @{
                                   @"playerName":@"赵四",
                                   @"isSelf":@NO,
                                   @"bonus":@-10,
                                   @"tags":@[@"平胡"]
                                   },
                               @{
                                   @"playerName":@"刘能",
                                   @"isSelf":@NO,
                                   @"bonus":@3,
                                   @"tags":@[@"平胡"]
                                   },
                               @{
                                   @"playerName":@"范增",
                                   @"isSelf":@NO,
                                   @"bonus":@-5,
                                   @"tags":@[]
                                   },
                               
                               ]
                       },
                     @{@"setNo":@1,
                       @"players":@[
                               @{
                                   @"playerName":@"张三",
                                   @"isSelf":@YES,
                                   @"bonus":@22,
                                   @"tags":@[@"平胡",@"龙七对",@"清一色"]
                                   },
                               @{
                                   @"playerName":@"赵四",
                                   @"isSelf":@NO,
                                   @"bonus":@2,
                                   @"tags":@[@"平胡"]
                                   },
                               @{
                                   @"playerName":@"刘能",
                                   @"isSelf":@NO,
                                   @"bonus":@0,
                                   @"tags":@[@"平胡"]
                                   },
                               @{
                                   @"playerName":@"范增",
                                   @"isSelf":@NO,
                                   @"bonus":@-20,
                                   @"tags":@[]
                                   },
                               
                               ]
                       },
                     
                     ];
    
    
    NSArray *typeName = @[@"平胡",
                     @"大对",
                     @"清一色",
                     @"巧七对",
                     @"龙七对",
                     @"幺九",
                     @"清对",
                     @"将对",
                     @"杠上花",
                     @"加番"];
}

@end
